#include <stdio.h>

/* copies input to output; trims several blanks to one blank */

main()
{
    int c, blank;
    
    blank = 0;
    
    while((c = getchar()) != EOF)
    {
        if(c == ' ')
        {
            if(blank == 0)
            {
                ++blank;
                putchar(c);
            }
        }
        else
        {
            blank = 0;
            putchar(c);
        }
    }
}
